import requests


class TokenUtil:
    @classmethod
    #封装读取token的方法
    def token_get(cls):
        url = 'http://ihrm2-test.itheima.net/api/sys/login'
        header = {"Content-Type": "application/json"}
        body ={"mobile": "13800000002", "password": "123456"}
        resp = requests.post(url=url, headers=header, json=body)
        token =resp.json().get('data')
        return token
